{block name="main"}

<div class="upload-img-box" style="width: {$width}px;height:{$height}px" id="{$elem_id}_box" data-id="{$elem_id}"
     data-url="{$url}" data-width="{$width}" data-height="{$height}"
     data-cropper="{$cropper}"
>
    {if $value }
         <img src="{$value}" alt="" style="width: 100%;height: 100%;" onerror="this.src='{$static_root}img/img_load_error.png'">
    {else/}
        <i class="layui-icon layui-icon-upload-drag"></i>
        <span>点击上传</span>
    {/if}

</div>
<div style="color: #d2d2d2;font-size: 12px;">{if !$cropper}建议{/if}尺寸 {$width}*{$height}  比例 {:sprintf("%.2f",$width/$height)}:1</div>
<input type="hidden" {$attr} id="{$elem_id}_input" class="layui-input {$class}" name="{$field}" value="{$value}">

{/block}
{block name="style"}{/block}
{block name="js"}{/block}
